import random
class DigitalGeneration:
    def __init__(self,size=10,weight=1000):
        length = []
        self.length=length
        while len(length)<size:
            #print(length)
            digital=random.randint(0,weight)
            if 10<digital<500:
                length.append(digital)
Many=DigitalGeneration(21)
#print(Many.length)
def main():
     return {(Many.length[2*n],Many.length[2*n+1]) for n in range(10)}

print(main())


# 生成范围为什么不两端都可以设定范围呢
